<div appBsModal #editModal="bs-modal" class="modal fade" [ngClass]="modalExpandOb.className" tabindex="-1" role="dialog"
    aria-labelledby="editModal" aria-hidden="true" [config]="{backdrop: 'static', keyboard: !saving}">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <form #flowForm="ngForm" novalidate (ngSubmit)="save()">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span *ngIf="flowNodeId">{{'Edit' | localize}} {{flowNodeId}}</span>
                        <span *ngIf="!flowNodeId">{{'Create' | localize}}</span>
                    </h4>
                    <span class="pull-right">
                        <a class="btn btn-smallEx" (click)='modalExpandOb.modalExHandle("small")'>
                            <i class="bi bi-arrows-angle-expand" *ngIf="!modalExpandOb.isSmallEx"></i>
                            <i class="bi bi-arrows-angle-contract" *ngIf="modalExpandOb.isSmallEx"></i>
                        </a>
                        <a class="btn btn-fullscreen" (click)='modalExpandOb.modalExHandle("full")'>
                            <i class="bi bi-arrows-fullscreen" *ngIf="!modalExpandOb.isFullScreen"></i>
                            <i class="bi bi-fullscreen-exit" *ngIf="modalExpandOb.isFullScreen"></i>
                        </a>
                        <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')"
                            [disabled]="saving">
                            <i aria-hidden="true" class="bi bi-x"></i>
                        </button>
                    </span>
                  
                </div>
                <div class="modal-body">
                    <div class="form-group form-md-line-input form-md-floating-label no-hint">
                        <label>{{'Name' | localize}}</label>
                        <input class="form-control" type="text" name="name" [(ngModel)]="fields.name"  required />
                       
                    </div>
                    <div class="form-group form-md-line-input form-md-floating-label no-hint">
                        <label>简称</label>
                        <input class="form-control" type="text" name="shortName" [(ngModel)]="fields.shortName" />
                    </div>
        
                    <div class="form-group">
                        <div class="row">
                            <div class="col-sm-6">
                                <label>描述&nbsp;</label>
                            </div>
                            <div class="col-sm-6"></div>
                        </div>
                        <textarea class="form-control" rows="4" [(ngModel)]="fields.description" id="Description" name="Description"></textarea>
                    </div>
        
                    <div class="form-group form-md-line-input form-md-floating-label no-hint">
                        <label>操作模式</label>
                        <select name="actionScheme" id="actionScheme"
                                                class="form-control edited"
                                                [(ngModel)]="fields.actionScheme">
                                            <option *ngFor="let op of actionSchemeList" value="{{op.value}}">{{op.name}}</option>
                                        </select>
                    </div>
        
                    <!--下一步-->
                    <div class="form-group">
                        <label>下一步:</label>
                        <div class="row">
                            <div class="col-sm-5">
                                <label>流程环节:</label>
                                <select class="form-control" size="4" style="height:234px;width:200px;" name="addselectNextNodes">
                                    <option *ngFor="let item of allNodes" (dblclick)="dbSelectItem(item,selectNextNodes)">{{item.name}}</option>
                                </select>
                            </div>
        
                            <div class="col-sm-5">
                                <label>已选择:</label>
                                <select class="form-control" size="4" style="height:234px;width:200px;" name="reselectNextNodes">
                                    <option *ngFor="let item of selectNextNodes" (dblclick)="dbRemoveItem(item,selectNextNodes)">{{item.name}}</option>
                                </select>
                            </div>
                            <div class="col-sm-2">
                                <button type="button" class="btn btn-primary blue" (click)="clear(selectNextNodes)">清空</button>
                            </div>
                        </div>
                    </div>
        
                    <!--后退-->
                    <div class="form-group">
                        <label>退回:</label>
                        <div class="row">
                            <div class="col-sm-5">
                                <label>流程环节:</label>
                                <select class="form-control" size="4" style="height:234px;width:200px;" name="backSelectBackNodes">
                                    <option *ngFor="let item of allNodes"  (dblclick)="dbSelectItem(item,selectBackNodes)">{{item.name}}</option>
                                </select>
                            </div>
                            <div class="col-sm-5">
                                <label>已选择:</label>
                                <select class="form-control" size="4" style="height:234px;width:200px;" name="reSelectBackNodes">
                                    <option *ngFor="let item of selectBackNodes"  (dblclick)="dbRemoveItem(item,selectBackNodes)">{{item.name}}</option>
                                </select>
                            </div>
                            <div class="col-sm-2"><button type="button" class="btn btn-primary blue" (click)="clear(selectBackNodes)">清空</button></div>
                        </div>
                    </div>
                    <!--指定人员-->
                    <div class="form-group">
                        <div class="row">
                            <div class="col-sm-6">
                                <label>指定人员&nbsp;</label>
                                <a role="button" class="btn btn-xs2 btn-circle"  (click)="selectionUsers()"><i class="fa fa-plus"></i>添加</a>
                            </div>
                            <div class="col-sm-6"></div>
                        </div>
                        <textarea class="form-control" [(ngModel)]="fields.userNames" rows="4" disabled name="userNames"></textarea>
                    </div>
        
                    <div class="form-group">
                        <label>操作Action</label>
                        <div class="row">
                            <div class="col-sm-5">
                                <label>操作清单:</label>
                                <select class="form-control" size="4" style="height:234px;width:200px;" name="addActionName">
                                    <option  *ngFor="let item of actionNames"  (dblclick)="dbSelectItem(item,selectedActionNames)">{{item.name}}</option>
                                </select>
                            </div>
                            <div class="col-sm-5">
                                <label>已选择:</label>
                                <select class="form-control" size="4" style="height:234px;width:200px;" name="reActionName">
                                    <option  *ngFor="let item of selectedActionNames" (dblclick)="dbRemoveItem(item,selectedActionNames)">{{item.name}}</option>
                                </select>
                            </div>
                            <div class="col-sm-2"><button type="button" class="btn btn-primary blue" (click)="clear(selectedActionNames)">清空</button></div>
                        </div>
                    </div>
        
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                                <label>待选人员智能过滤</label>
                                <select class="form-control edited"  [(ngModel)]="fields.beforeSelectFilter" name="addbeforeSelect">
                                    <option  *ngFor="let item of operatorFilterSource" value="{{item.value}}">{{item.name}}</option>
                                </select>
                              
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                                <label>选定人员智能过滤</label>
                                <select class="form-control edited" [(ngModel)]="fields.selectedFilter" name="rebeforeSelect">
                                    <option  *ngFor="let item of operatorFilterSource" value="{{item.value}}">{{item.name}}</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label>待选人员智能过滤 补充</label>
                        <div class="row">
                            <div class="col-sm-5">
                                <label>操作清单:</label>
                                <select class="form-control" size="4" style="height:234px;width:200px;" name="addbeforeSelect2">
                                    <option *ngFor="let item of posts"  (dblclick)="dbSelectItem(item,beforeSelectFilter2)">{{item.displayName}}</option>
                                </select>
                            </div>
                            <div class="col-sm-5">
                                <label>已选择:</label>
                                <select class="form-control" size="4" style="height:234px;width:200px;" name="rebeforeSelect2">
                                    <option *ngFor="let item of beforeSelectFilter2"  (dblclick)="dbRemoveItem(item,beforeSelectFilter2)">{{item.displayName}}</option>
                                </select>
                            </div>
                            <div class="col-sm-2"><button type="button" class="btn btn-primary blue" (click)="clear(beforeSelectFilter2)">清空</button></div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label>操作选定人员智能过滤 补充</label>
                        <div class="row">
                            <div class="col-sm-5">
                                <label>操作清单:</label>
                                <select class="form-control" size="4" style="height:234px;width:200px;" name="addPost">
                                    <option *ngFor="let item of posts"  (dblclick)="dbSelectItem(item,selectedFilter2)">{{item.displayName}}</option>
                                </select>
                            </div>
                            <div class="col-sm-5">
                                <label>已选择:</label>
                                <select class="form-control" size="4" style="height:234px;width:200px;" name="rePost">
                                    <option *ngFor="let item of selectedFilter2" >{{item.displayName}}</option>
                                </select>
                            </div>
                            <div class="col-sm-2"><button type="button" class="btn btn-primary blue" (click)="clear(selectedFilter2)">清空</button></div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="md-checkbox-list">
                                <div class="md-checkbox">
                                    <input id="CanEditAttachment" class="md-check" type="checkbox" name="canEditAttachment" [(ngModel)]="fields.canEditAttachment">
                                    <label for="CanEditAttachment">
                                        <span class="inc"></span>
                                        <span class="check"></span>
                                        <span class="box"></span>
                                        是否可以编辑附件
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="md-checkbox-list">
                                <div class="md-checkbox">
                                    <input id="Active" class="md-check" type="checkbox" name="Active" [(ngModel)]="fields.isActive">
                                    <label for="Active">
                                        <span class="inc"></span>
                                        <span class="check"></span>
                                        <span class="box"></span>
                                        是否发布
                                    </label>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                                <select class="form-control edited" [(ngModel)]="fields.optionFunction" name="optionFunction">
                                    <option value="">请选择</option>
                                    <option *ngFor="let type of functions"  value="{{type.value}}">{{type.name}}</option>
                                </select>
                                <label>自定义插件</label>
                            </div>
                        </div>
                      
                    </div>
        
                   
                </div>
                <div class="modal-footer">
                    <button [disabled]="saving" type="button" class="btn btn-light-primary font-weight-bold"
                        (click)="close()">{{"Cancel" | localize}}</button>
                    <button type="submit" class="btn btn-primary font-weight-bold"
                        [disabled]="!flowForm.form.valid" [buttonBusy]="saving"
                        [busyText]="l('SavingWithThreeDot')"><i class="fa fa-save"></i> <span>{{"Save" | localize}}</span></button>
                </div>
            </form>
        </div>
    </div>
</div>

<selection-user-box #selectUserModal (selectUserModalSave)="selectionUserBackData($event)"></selection-user-box>
